//
//  UIImage+FWPowerful.h
//  iOSToolkit
//
//  Created by Evan Xie on 9/17/14.
//  Copyright (c) 2014 Family Wings. All rights reserved.
//

#import <UIKit/UIKit.h>


typedef enum{
    CMTFilterTypeNormal,            /* 源图像, 不做任何处理 */
    CMTFilterTypeBlackWhite,        /* 黑白: Black white */
    CMTFilterTypeColorRevert,       /* 颜色反相: Color revert */
    CMTFilterTypeGothic,            /* 哥特式: Gothic, 红与黑*/
    CMTFilterTypeSharpen,           /* 锐化: Sharpen */
    CMTFilterTypeSimpleElegant,     /* 淡雅: Simple but elegant */
    CMTFilterTypeWineRed,           /* 酒红: Wine red */
    CMTFilterTypeDream,             /* 梦幻: Dream */
    CMTFilterTypeNight              /* 夜色: Night */
}CMTFilterType;


@interface UIImage (FWPowerful)

- (UIImage *)imageWithTintColor:(UIColor *)tintColor;
- (UIImage *)imageWithLinearGradientTintColors:(NSArray *)gradientColors;

/**
 Scale image to specified size, but the scaled image content is affected by shouldReserveAspectRatio and scale mode.
 
 @param
 shouldReserveAspectRatio If yes, reserver the origin image aspect ration, or just scale by specified size.
 fitOrFill  0 is aspect fit mode; 1 is aspect fill mode.
 */
- (UIImage *)scaleToSize:(CGSize)size shouldReserveAspectRatio:(BOOL)shouldReserveAspectRatio scaleMode:(uint8_t)fitOrFill;

@end
